package com.taobao.snowsnow.hibernate.pojo;

import java.util.ArrayList;
import java.util.List;

public class Dimension {

	private Integer id;
	private String name;
	private String descs;
	private List<ItemCollect> itemCollect = new ArrayList<ItemCollect>();

	public Dimension() {
	}

	public Dimension(String name, String descs) {
		super();
		this.name = name;
		this.descs = descs;
	}

	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescs() {
		return this.descs;
	}

	public void setDescs(String descs) {
		this.descs = descs;
	}

	public List<ItemCollect> getItemCollect() {
		return itemCollect;
	}

	public void setItemCollect(List<ItemCollect> itemCollect) {
		this.itemCollect = itemCollect;
	}

	@Override
	public String toString() {
		return "Dimension [id=" + id + ", name=" + name + ", descs=" + descs
				+ "]";
	}

	@Override
	public boolean equals(Object obj) {
		Dimension o = (Dimension) obj;
		
		if(o.getId() != null) {
			if(o.getId() == this.id)
				return true;
		}
		
		if(o.getName().equals(this.name))
			return true;
		return false;
	}
}